tests: add key image spent status lifecycle test#10334
Closed
DUQUEredes wants to merge 1 commit intomonero-project:masterfrom
Closed
tests: add key image spent status lifecycle test#10334DUQUEredes wants to merge 1 commit intomonero-project:masterfrom
DUQUEredes wants to merge 1 commit intomonero-project:masterfrom
Conversation
Test is_key_image_spent RPC across all three status codes (0=UNSPENT, 1=SPENT_IN_BLOCKCHAIN, 2=SPENT_IN_POOL). The existing test in transfer.py only covers status 0 and 1. This adds coverage for the mempool-specific status 2 and verifies lifecycle transitions: pool->blockchain, pool->flush->unspent, and mixed-state batch queries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5c0013f to
8688093
Compare
Collaborator
Please only submit PRs that are clear bug or logic fixes. AI generated pull requests that add vague test cases with no clear benefit, or other changes that are not done with clear purpose will get closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
is_key_image_spent.pycovering the full lifecycle of key image spent status codestransfer.pyonly covers status 0 (UNSPENT) and 1 (SPENT_IN_BLOCKCHAIN); status 2 (SPENT_IN_POOL) is never testedDEFAULT_TESTSinfunctional_tests_rpc.pyso it runs in CITest cases
check_unspentcheck_spent_in_poolcheck_spent_in_blockchaincheck_flush_returns_to_unspentcheck_mixed_statescheck_edge_casesTest plan
functional_tests_rpc.pyDEFAULT_TESTSPYTHONPATH=utils/python-rpc python3 tests/functional_tests/is_key_image_spent.pywith monerod + wallet-rpc in regtest🤖 Generated with Claude Code